var api = {
    sendCode: function(params,cb){
        return ajax({
            url: '/blade-auth/app/send/login_code',
            method: 'get',
            data: params
        }, cb)
    },
    login: function(params,cb){
        return ajax({
            url: '/blade-auth/app/oauth/token',
            method: 'post',
            data: params
        }, cb)
    },
    logout: function(params,cb){
        return ajax({
            url: '/blade-auth/app/oauth/logout',
            method: 'post',
            data: params
        }, cb)
    },
    stockList: function(params,cb){
        return ajax({
            url: '/stock/instock/list',
            method: 'get',
            data: params
        }, cb)
    },
    stockDetail: function(params,cb){
        return ajax({
            url: '/stock/instock/detail',
            method: 'get',
            data: params
        }, cb)
    },
    statistics: function(params,cb){
        return ajax({
            url: '/stock/instock/statistics',
            method: 'post',
            data: params
        }, cb)
    },
    memberInfo: function(params,cb){
        return ajax({
            url: '/blade-member/member/info',
            method: 'get',
            data: params
        }, cb)
    },
    orderList: function(params,cb){
        return ajax({
            url: '/blade-order/order/list',
            method: 'get',
            data: params
        }, cb)
    },
    inquiries: function(params,cb){
        return ajax({
            url: '/blade-member/member/inquiries',
            method: 'get',
            data: params
        }, cb)
    },
    health: function(params,cb){
        return ajax({
            url: '/blade-member/member/health',
            method: 'get',
            data: params
        }, cb)
    },
    uploadInventory: function(params,cb){
        return upload({
            url: '/upload/stock/inStock',
            method: 'post',
            data: params
        }, cb)
    },
    companyDetail: function(params,cb){
        return ajax({
            url: '/company/company/detail',
            method: 'get',
            data: params
        }, cb)
    },
    companyInfo: function(params,cb){
        return ajax({
            url: '/company/company/info',
            method: 'get',
            data: params
        }, cb)
    },
    saveCompanyInfo: function(params,cb){
        return post({
            url: '/company/company/submit',
            method: 'post',
            data: params
        }, cb)
    },
    complaint: function(params,cb){
        return post({
            url: '/complaint/save',
            method: 'post',
            data: params
        }, cb)
    },
    receiveMsg: function (params,cb){
        return post({
            url: '/chatroom/receive',
            method: 'post',
            data: params
        }, cb)
    },
    sendMsg: function (params,cb){
        return post({
            url: '/chatroom/sender',
            method: 'post',
            data: params
        }, cb)
    },
    online: function (params,cb){
        return ajax({
            url: '/chatroom/online',
            method: 'get',
            data: params
        }, cb)
    }
}
